/**
 * TODO generated, please specify type and doc for the params
 * @param event
 *
 * @properties={typeid:24,uuid:"24ECF2AB-90A0-45FC-842C-A80821943184"}
 */
function cancelar(event) {
	databaseManager.revertEditedRecords()
	databaseManager.setAutoSave(true)
	var $win = application.getWindow('ALTA_TIPOPROVEEDOR')
	$win.hide()
	$win.destroy()
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"D717CB80-6B68-4782-B136-88E984E2587D"}
 */
function aceptar(event) {
	if (databaseManager.saveData())
	{
		databaseManager.setAutoSave(true)
		var $win = application.getWindow('ALTA_TIPOPROVEEDOR')
		$win.hide()
		$win.destroy()
	}
	else
	{
		globals.DIALOGS.showErrorDialog('Error','Ocurrio un error','OK')
	}
}

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @private
 *
 * @properties={typeid:24,uuid:"E7984F7B-1754-4BFD-911C-2B86DCCB13A4"}
 */
function onShow(firstShow, event) {
	elements.fld_descripcion.requestFocus()
}
